<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>个人中心</title>
	<link rel="stylesheet" href="${request.contextPath}/plugins/bootstrap/css/bootstrap.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/font-awesome/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="${request.contextPath}/plugins/select2/select2.min.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/iCheck/skins/all.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/jquery-confirm/jquery-confirm.min.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/bootstrap-fileinput/fileinput.min.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/animate.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/style.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/common.css">
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>个人信息</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="userInfoForm" method="post" action="${request.contextPath}/system/center/updateUser">
							<input type="hidden" value="${(sysUser.id)!}" id="id" name="id">
							<div class="form-group">
								<label class="col-sm-2 control-label">用户名称：</label>
								<div class="col-sm-9">
									<input id="userName" name="userName" value="${(sysUser.userName)!}" placeholder="请输入用户名" type="text" class="form-control" required>
								</div>
							</div>
							<div class="form-group">
								<input type="hidden" value="${(sysUser.userImg)!}" id="userImg" name="userImg">
								<label class="col-sm-2 control-label">用户头像：</label>
								<div class="col-sm-9">
									<input name="file" type="file" class="file-loading" id="systemLogo">
									<div class="file-loading">
										<input id="uploadImg" name="file" type="file" multiple>
									</div>
								</div>
							</div>
							<#if info??>
								<div class="form-group">
								<div  class="alert alert-success alert-dismissible">
								 <h4 style="margin-bottom: 0px;"><i class="fa fa-info"></i> ${info!}</h4>
								</div>
								</div>
							</#if>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-2">
									<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-save"></i>  提 交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 通用js引入 -->
	<script src="${request.contextPath}/plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<script src="${request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script src="${request.contextPath}/plugins/select2/select2.full.min.js"></script>
	<script src="${request.contextPath}/plugins/iCheck/icheck.min.js"></script>
	<script src="${request.contextPath}/plugins/layer/layer.min.js"></script>
	<script src="${request.contextPath}/plugins/laydate/laydate.js"></script>
	<script src="${request.contextPath}/plugins/jquery.cookie.js"></script>
	<script src="${request.contextPath}/plugins/jquery-confirm/jquery-confirm.min.js"></script>
	<script src="${request.contextPath}/plugins/validate/jquery.validate.min.js"></script>
	<script src="${request.contextPath}/plugins/validate/messages_zh.min.js"></script>
	<script src="${request.contextPath}/plugins/bootstrap-fileinput/fileinput.min.js"></script>
	<script src="${request.contextPath}/hadmin/js/content.js"></script>
	<script src="${request.contextPath}/hadmin/js/common.js?v=0.9"></script>
	<script type="text/javascript">
		$(function(){
			$("#userInfoForm").validate();
		})

		$("#uploadImg").fileinput({
			uploadUrl: '${request.contextPath}/file/upload',
			maxFileCount: 1,
			autoReplace: true,
			layoutTemplates:{
				actionUpload:'',//去除上传预览缩略图中的上传图片
				actionDownload:'' ,//去除上传预览缩略图中的下载图标
				actionDelete:'', //去除上传预览的缩略图中的删除图标
			},
		}).on('fileuploaded', function (event, data, previewId, index) {
			console.operateLog("return data：", data.response);
			console.operateLog("return urls：" + data.response.urls);
			console.operateLog("reutrn status：" + data.response.status);
			$('#userImg').val(data.response.urls);
		}).on('filecleared', function(event) {
			$('#userImg').val('');
		})
	</script>
</body>
</html>
